import http from '../../utils/http'

export const reqAddCart = ({ goodsId, count, ...data }) => {
    return http.get(`/cart/addToCart/${goodsId}/${count}`, data)
}
export const reqCartList = () => {
    return http.get('/cart/getCartList')
}

export const reqUpdateChecked = (goodsId, isChecked) => {
    return http.get(`/cart/checkCart/${goodsId}/${isChecked}`)
}

//全选与全不选
export const reqCheckedAllStatus = (isChecked) => {
    return http.get(`/cart/checkAllCart/${isChecked}`)
}
//删除购物车
export const reqDelCartGoods = (goodsId) => {
    return http.get(`/cart/delete/${goodsId}`)
}